Global Index
HTML5 JS API Index > Web Sockets and Messaging Tutorials & Specs

CloseEventInit

Extends EventInit.

This type represents a collection of object properties and does not have an explicit JavaScript representation.

Properties
unsigned short
code
The code attribute must return the value it was initialized to. When the object is created, this attribute must be initialized to zero. It represents the WebSocket connection close code provided by the server.
DOMString
reason
The reason attribute must return the value it was initialized to. When the object is created, this attribute must be initialized to empty string. It represents the WebSocket connection close reason provided by the server.
boolean
wasClean
The wasClean attribute must return the value it was initialized to. When the object is created, this attribute must be initialized to false. It represents whether the connection closed cleanly or not.
Referenced by
CloseEventCloseEvent(...)